using System.IO;

namespace BLGenerator.BusinessLogic.FileGenerators
{
    public class StringFileBlock : IFileBlock
    {
        private readonly string _string;
        public StringFileBlock(string str)
        {
            _string = str;
        }

        public void WriteToStream(StreamWriter stream, int tabNums)
        {
            stream.Write(FileGeneratorsHelper.TabsToString(tabNums));
            stream.WriteLine(_string);
        }
    }
}